﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QingZhouLinYe_Web
{
    public class Line
    {
        public Location[] line { get; set; }


        public Line(Location[] locations) {
            line = locations;
        }

        public override string ToString()
        {
            string linestr = "";
            for(int i = 0;i< line.Count(); i++)
            {
                linestr += line[i].X +" " + line[i].Y + " " + line[i].Z +",";
            }
            linestr = linestr.Substring(0, linestr.Length-1);
            return $"LINESTRING ("+linestr+")";
        }
    }
}